package org.springblade.modules.admin.dto;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.bstek.ureport.model.Report;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.admin.entity.*;
import org.springblade.modules.admin.vo.elevator.ElevatorFloorVo;
import org.springblade.modules.admin.vo.parts.PartWordUrlVo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/4/13 9:38
 */
@ApiModel("电梯信息添加model")
@Data
public class ElevatorSaveDto extends ElevatorDetail {

	/**
	 * 栋
	 */
	@TableField(value = "block")
	private String block;

	/**
	 * 单元
	 */
	@TableField(value = "unit")
	private String unit;

	/**
	 * 梯号
	 */
	@TableField(value = "num")
	private Integer num;

	/**
	 * 层数
	 */
	@TableField(value = "`floor`")
	private String floor;

	/**
	 * 品牌id
	 */
	@TableField(value = "brand_id")
	private Long brandId;

	/**
	 * 品牌型号id
	 */
	@TableField(value = "brand_v_id")
	private Long brandVId;

	/**
	 * 品牌型号系列id
	 */
	@TableField(value = "brand_v_sku_id")
	private Long brandVSkuId;

	/**
	 * 品牌名称
	 */
	@TableField(value = "brand_name")
	private String brandName;

	/**
	 * 系列id
	 */
	@TableField(value = "series_name")
	private String seriesName;

	/**
	 * 型号id
	 */
	@TableField(value = "type_name")
	private String typeName;

	/**
	 * 电梯年限
	 */
	@JsonSerialize(nullsUsing = NullSerializer.class)
	@TableField(value = "elevator_year",updateStrategy = FieldStrategy.IGNORED)
	private Integer elevatorYear;

	/**
	 * 电梯年审时间
	 */
	@TableField(value = "elevator_audit")
	private String elevatorAudit;

	/**
	 * 楼盘id
	 */
	@TableField(value = "building_id")
	private Long buildingId;

	/**
	 * 设备代码
	 */
	@TableField(value = "private_num")
	private String privateNum;


	@ApiModelProperty(value = "电梯设备id")
	private String deviceId;

	/**
	 * 自定义单位 例如 栋，座
	 */
	@TableField(value = "block_name")
	private String blockName;

	/**
	 * 自定义单位 例如 单元
	 */
	@TableField(value = "unit_name")
	private String unitName;

	@ApiModelProperty("1:非年审，2:年审")
	private Integer auditType;

	@ApiModelProperty("停梯状态： 1-正常 2-停梯")
	private Integer isStop;


	@ApiModelProperty("项目电梯模板id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long templateId;

	private String releIds;

	@ApiModelProperty("项目电梯模板层级")
	private List<BuildingElevatorTemplateRele> releList;

	private ElevatorFieldV fieldV;

	private Long elevatorUseType;

	/**
	 * 电梯标签
	 */
	private String elevatorLabel;

	/**
	 * 电梯别名
	 */
	private String elevatorAlias;

	private ElevatorExt elevatorExt;

	/**
	 * 使用证标志附件url列表
	 */
	private List<ElevatorAttachmentHistory> certificateMarkList;

	/**
	 * 铭牌附件url列表
	 */
	private List<ElevatorAttachmentHistory> nameAttachmentList;

	//2024-07-25新增
	@ApiModelProperty("维保-服务电话")
	private String wbPhone;

	@ApiModelProperty("维保-服务电话贴纸")
	private List<PartWordUrlVo> wbPhoneImg;

	@ApiModelProperty("维保-更新时间")
	private Date wbPhoneImgDate =  new Date();

	@ApiModelProperty("维保-标致附件url")
	private List<PartWordUrlVo> wbExtUrl;

	@ApiModelProperty("保险公司名称")
	private  Long bxCompanyId;

	@ApiModelProperty("保险公司到期时间")
	private  Date bxCompanyEndDate;

	@ApiModelProperty("保险-标致url")
	private List<PartWordUrlVo> bxExtUrl;

	@ApiModelProperty("保险-标致url")
	private Date bxExtUrlDate = new Date();

	@ApiModelProperty("维保-标致附件url更新时间")
	private Date wbExtUrlDate  =  new Date();

	@ApiModelProperty("层信息")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<ElevatorFloorVo> floorTier;

	@ApiModelProperty("站信息")
	private List<ElevatorFloorVo> floorPlatforms;

	@ApiModelProperty("门信息")
	private List<ElevatorFloorVo> floorDoors;

	@ApiModelProperty("安装单位")
	private String azUnitName;

	@ApiModelProperty("安装监督检验日期")
	private String azCheckDate;

	@ApiModelProperty("安装单位启用日期")
	private Date azCheckBeginDate;

	@ApiModelProperty("改装单位名称")
	private String gzUnitName;

	@ApiModelProperty("改造监督检验日期")
	private String gzCheckDate;

	@ApiModelProperty("改装单位名称")
	private String dxUnitName;

	@ApiModelProperty("改造监督检验日期")
	private String dxCheckDate;

	@ApiModelProperty("楼层编号逗号分割")
	private String floorNums;

	@ApiModelProperty("类型位置完整度")
	private BigDecimal lwIntact;

	@ApiModelProperty("结构完整度")
	private BigDecimal jgIntact;

	@ApiModelProperty("维保完整度")
	private BigDecimal wbIntact;

	@ApiModelProperty("保险完整度")
	private BigDecimal bxIntact;

	@ApiModelProperty("设备技术完整度")
	private BigDecimal sbJsIntact;

	@ApiModelProperty("设备注册完整度")
	private BigDecimal sbZcIntact;

	@ApiModelProperty("出厂完整度")
	private BigDecimal ccIntact;

	@ApiModelProperty("使用完整度")
	private BigDecimal syIntact;

	@ApiModelProperty("安装完整度")
	private BigDecimal azIntact;

	@ApiModelProperty("梯无忧完整度")
	private BigDecimal twyIntact;

	@ApiModelProperty("来源描述")
	private String sourceDesc;

	@ApiModelProperty("电梯来源: -1 无状态1:安装2:新接")
	private String sourceStatus;

	@ApiModelProperty("电梯生命周期")
	private Integer lifeStatus;

	@ApiModelProperty("年审提醒")
	private ElevatorAudit elevatorAudits;

}
